/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.herenit.beijing.poc.empi;

import com.herenit.beijing.dh2011.entity.EtConcepts;
import java.awt.Component;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;

/**
 *
 * @author Obama
 */
public class EtConceptsRenderer extends DefaultListCellRenderer {

    @Override
    public Component getListCellRendererComponent(
            JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
        super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
        if (value instanceof EtConcepts) {
            EtConcepts mec = (EtConcepts) value;
            setText(mec.getConceptName());
        }
        return this;
    }
}
